import com.jiayou.NettyApplication
import com.jiayou.server.ImServer
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner

/**
@author 李 双
@data   2020-11-19  12:51
@info
 */
@ContextConfiguration(classes = [NettyApplication::class])
@RunWith(SpringRunner::class)
@SpringBootTest
class KotlinSpringBootTest {

    @Value("${'$'}{server.port}")
    lateinit var port: String

    @Autowired
    private lateinit var imServer: ImServer


    @Test
    fun test() {
        println(port)
        println(imServer.bossNum)
        println(imServer.workNum)
        println(imServer.safeCheeck)
        println(imServer.port)
    }

}